﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.Library.StringExt
{
    public static class AddressExt
    {
        /// <summary>
        /// C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\testhost.x86.exe
        /// </summary>
        /// <returns></returns>
        public static string FileName()
        {
            return System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
        }

        /// <summary>
        /// E:\01.Git\Qiao.Common\Spider\SpiderTest\bin\Debug
        /// </summary>
        /// <returns></returns>
        public static string CurrentDirectory()
        {
            return System.Environment.CurrentDirectory;
        }

        /// <summary>
        /// E:\01.Git\Qiao.Common\Spider\SpiderTest\bin\Debug
        /// </summary>
        /// <returns></returns>
        public static string GetCurrentDirectory()
        {
            return System.IO.Directory.GetCurrentDirectory();
        }

        /// <summary>
        /// E:\01.Git\Qiao.Common\Spider\SpiderTest\bin\Debug
        /// </summary>
        /// <returns></returns>
        public static string BaseDirectory()
        {
            return System.AppDomain.CurrentDomain.BaseDirectory;
        }

        /// <summary>
        /// E:\01.Git\Qiao.Common\Spider\SpiderTest\bin\Debug
        /// </summary>
        /// <returns></returns>
        public static string ApplicationBase()
        {
            return System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
        }


        //public static string Getdfdf()
        //{
        //    return System.Windows.Forms.Application.StartupPath;
        //}



    }
}
